package shared.other;

import backend.model.admin.*;
import backend.model.base.DBModel;
import backend.model.other.LegalHoliday;
import backend.model.other.MonthState;
import backend.model.other.User;
import backend.model.worklog.WorkLog;
import backend.model.worklog.WorkLogMismatch;
import backend.service.admin.*;
import backend.service.base.DBModelService;
import backend.service.other.LegalHolidayService;
import backend.service.other.MonthStateService;
import backend.service.other.UserService;
import backend.service.worklog.WorkLogMismatchService;
import backend.service.worklog.WorkLogService;

import java.util.HashMap;

public class DBModelToServiceNameMap {
    private static HashMap<Class<? extends DBModel>, Class<? extends DBModelService>> map = new HashMap<Class<? extends DBModel>, Class<? extends DBModelService>>();

    static {
        map.put(Activity.class, ActivityService.class);
        map.put(CommuterData.class, CommuterDataService.class);
        map.put(Department.class, DepartmentService.class);
        map.put(Employee.class, EmployeeService.class);
        map.put(Team.class, TeamService.class);
        map.put(ForeignManager.class, ForeignManagerService.class);
        map.put(Foreman.class, ForemanService.class);
        map.put(LegalHoliday.class, LegalHolidayService.class);
        map.put(MonthState.class, MonthStateService.class);
        map.put(Occupation.class, OccupationService.class);
        map.put(Project.class, ProjectService.class);
        map.put(Sfi.class, SfiService.class);
        map.put(Shift.class, ShiftService.class);
        map.put(User.class, UserService.class);
        map.put(Workplace.class, WorkplaceService.class);
        map.put(WorkDetail.class, WorkDetailService.class);
        map.put(WorkLog.class, WorkLogService.class);
        map.put(WorkLogMismatch.class, WorkLogMismatchService.class);
    }

    public static Class<? extends DBModelService> getServiceByDBModel(Class<? extends DBModel> dbModelClass) {
        return map.get(dbModelClass);
    }
}
